import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { analyzer } from "vite-bundle-analyzer";
import path from 'path';
export default defineConfig({
    plugins: [
      react(), 
      analyzer()
    ],
    build: {
      minify: true,
      rollupOptions: {
        output: {
          manualChunks: {
            "vendor": ['react', 'react-dom'],
            "ui": ['antd'],
          },
        },
      }
    },
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src'),
        '@components': path.resolve(__dirname, 'src/components'),
        '@assets': path.resolve(__dirname, 'src/assets'),
        // 你可以根据需要添加更多别名
      },
    },
});
